package com.cxy.datawarehouse.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@ApiModel("标准表结构")
@Table(name = "t_standard_table_structure")
@DynamicInsert
@DynamicUpdate
public class StandardTableStructure implements Serializable{
    private static final long serialVersionUID = 1L;
    /**
     * 主键 标准表结构编号
     */
    @Id
    @ApiModelProperty("标准表结构编号")
    @Column(name = "standard_table_structure_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long standardTableStructureId;

    /**
     * 标准表编号
     */
    @ApiModelProperty("标准表编号")
    @Column(name = "standard_table_id", nullable = false)
    private Long standardTableId;

    /**
     * 字段名
     */
    @ApiModelProperty("字段名")
    @Column(name = "column_name", nullable = false)
    private String cloumnName;

    /**
     * 物理字段名
     */
    @ApiModelProperty("物理字段名")
    @Column(name = "phy_column_name", nullable = false)
    private String phyColumnName;

    /**
     * 字段类型
     */
    @ApiModelProperty("字段类型")
    @Column(name = "column_type", nullable = false)
    private Long columnType;

    /**
     * 字段属性
     */
    @ApiModelProperty("字段属性")
    @Column(name = "column_attr", nullable = false)
    private String columnAttr;

    /**
     * 落标情况（0-未落标 其他-标准编号）
     */
    @ApiModelProperty("落标情况")
    @Column(name = "standard_situation", nullable = false)
    private Long standardSituation;
}
